package com.heiye.quiz.biz.enums;

import com.heiye.framework.common.exception.BaseExceptionInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: heiye
 * @date: 2025/03/17 下午7:06
 * @version: v1.0.0
 * @description: 响应异常码
 */
@Getter
@AllArgsConstructor
public enum ResponseCodeEnum implements BaseExceptionInterface {
    // ----------- 通用异常状态码 -----------
    SYSTEM_ERROR("QUIZ-10000", "出错啦，后台小哥正在努力修复中..."),
    PARAM_NOT_VALID("QUIZ-10001", "参数错误"),

    // ----------- 业务异常状态码 -----------
    QUIZ_TYPE_ERROR("QUIZ-20000", "未知的问题类型"),
    QUIZ_PUBLISH_FAIL("QUIZ-20001", "问题发布失败"),
    QUIZ_NOT_FOUND("QUIZ-20002", "问题不存在"),
    QUIZ_UPDATE_FAIL("QUIZ-20003", "问题更新失败"),
    QUIZ_CANT_OPERATE("QUIZ-20004", "不能修改该问题"),
    QUIZ_ALREADY_LIKED("QUIZ-20005", "您已经点赞过该问题"),
    QUIZ_NOT_LIKED("QUIZ-20006", "您未点赞该篇问题，无法取消点赞"),
    ;

    // 异常码
    private final String errorCode;
    // 错误信息
    private final String errorMessage;
}
